﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace d1Project
{
    public class DoEnvironment
    {
        private static DoEnvironment singleInstance = new DoEnvironment();
        public static DoEnvironment Instance
        {
            get
            {
                return singleInstance;
            }
        }

        public const string DefaultDbName = "Default";

        public bool IsDebug
        {
            get
            {
                return this.isDebug;
            }
        }
        private bool isDebug=false;

        public static string GetExecutePath()
        {
            if (System.Web.HttpContext.Current != null)
            {
                return System.Web.HttpContext.Current.Request.MapPath(System.Web.HttpContext.Current.Request.ApplicationPath).Replace("\\", "/");
            }
            return System.AppDomain.CurrentDomain.BaseDirectory.Replace("\\", "/");
        }
    }
}